******************************************************************************************
README for 

Title:		'They Take Our Houses': Benefit Competition and the Erosion of Support for Immigrants� Social Rights
Author:		Gerda Hooijer
Contact:	ghooijer@princeton.edu
Date: 		February 29, 2020
******************************************************************************************

==========================
*** Setup instructions ***
==========================

For the analysis, you will need Stata. 
In Stata, install the following additional modules:
spmap
st0085_2

============
*** Data ***
============

The main analysis relies on two sets of data:

1. Municipal-level data

These data are stored in the following file: *municipality.dta*. The codebook *codebook_municipality.docx* 
includes information about the source of these data. 

2. Individual-level data

a) Data from the main survey of the Longitudinal Internet Studies for the Social sciences (LISS)
b) Data on the municipality of residence of respondents

These data are restricted-access data. The file *instructions_access_liss.docx* explains the procedures to gain access to them.

The file *merge_liss.do* sets out how to merge and recode these data once access has been granted 
and the necessary datasets have been downloaded into the home directory. It also describes how to
match the respondents to the Dutch Municipalities Dataset.  

In addition, the main text uses national-level data on the refugee dispersal system to produce Figure 1.
These data are stored in *NL_dispersal.dta*


======================================
*** Reproducing figures and tables ***
======================================

All figures and tables in the main text can be reproduced with the file *main_analysis.do*.

All output from the main text is stored in the file *log_main_analysis.scml*. 

=========================
*** Online Supplement ***
=========================

All figures and tables from the Online Supplement can be reproduced with the file *supplement.do*.

To this end, the following datasets are required:
*municipality.dta*
*liss_L1L2.dta*
*NL_housing.dta*
*NL_newhomes.dta*
*NL_news.dta*

All output from Online Supplement is stored in the file *log_supplement.scml*. 
